package com.hy.lightning.commons;

public class CustomException extends Exception {

	private static final long serialVersionUID = 1L;

	private Integer resultstate;//错误状态
	
	private String resultdesc;//错误结果描述
	
	public CustomException(Integer resultstate, String resultdesc) {
		this.resultstate = resultstate;
		this.resultdesc = resultdesc;
	}
	
	@Override
	public String getMessage() {
		return String.format("%s:%s", resultstate,resultdesc);
	}
	
	@Override
	public String toString() {
		return String.format("%s:%s", resultstate,resultdesc);
	}
}
